package id.net.iconpln.bb.server.dao.impl;

import java.util.List;

import id.net.iconpln.bb.server.dao.LogPageDao;
import id.net.iconpln.bb.server.model.persistence.LogPage;

import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

@Repository("logpageDao")
public class LogPageDaoHibernate implements LogPageDao{
	private SessionFactory sessionFactory;

	@Autowired
	public void setSessionFactory(SessionFactory sessionFactory) {
		this.sessionFactory = sessionFactory;
	}

	@Override
	public List<LogPage> getLogPageAll() {
		// TODO Auto-generated method stub
		
		return sessionFactory.getCurrentSession().createQuery(
		"from LOG_PAGE u order by u.namapage asc").list();
	}

}
